# -*- coding: utf-8 -*-
# @Time : 2021/7/3 14:56
# @Author : feimaotuiya
# @File : data_back_home.py
# @Project : ecshop-gitee


from selenium.webdriver.common.by import By

''' 此文本定义的是后台首页需要用到的xpath路径 '''


class DataBackHome():
    def __init__(self):
        # 一级目录
        self.goods_manage = (By.XPATH, '//ul[@id="menu-ul"]/li[1]')  # 商品管理
        self.promotion_manage = (By.XPATH, '//ul[@id="menu-ul"]/li[2]')  # 促销管理
        self.order_manage = (By.XPATH, '//ul[@id="menu-ul"]/li[3]')  # 订单管理
        self.member_manage= (By.XPATH, '//ul[@id="menu-ul"]/li[7]')  # 会员管理
        self.system_set = (By.XPATH, '//ul[@id="menu-ul"]/li[9]')  # 系统设置

        # 二级目录 商品管理
        self.goods_list = (By.XPATH, '//ul[@id="menu-ul"]/li[1]/ul/li[1]/a')  # 商品列表
        self.goods_add = (By.XPATH, '//ul[@id="menu-ul"]/li[1]/ul/li[2]/a')  # 商品添加
        self.goods_brand = (By.XPATH, '//ul[@id="menu-ul"]/li[1]/ul/li[5]/a')  # 商品品牌

        # 二级目录 促销管理
        self.promotion_red_page = (By.XPATH, '//ul[@id="menu-ul"]/li[2]/ul/li[2]/a') # 红包
        self.promotion_preferential = (By.XPATH, '//ul[@id="menu-ul"]/li[2]/ul/li[8]/a') # 优惠活动

        # 二级目录 订单管理
        self.order_list = (By.XPATH, '//ul[@id="menu-ul"]/li[3]/ul/li[1]/a')
        self.order_search=(By.XPATH,'//ul[@id="menu-ul"]/li[3]/ul/li[2]/a')

        # 二级目录 系统设置
        self.method_payment = (By.XPATH, '//ul[@id="menu-ul"]/li[9]/ul/li[3]/a')  # 支付方式
        self.in_distribution = (By.XPATH, '//ul[@id="menu-ul"]/li[9]/ul/li[4]/a')  # 配送方式
        self.user_remark = (By.XPATH, '//ul[@id="menu-ul"]/li[1]/ul/li[4]/a')  # 用户评论

        # 二级目录 会员管理
        self.member_list = (By.XPATH, '//ul[@id="menu-ul"]/li[7]/ul/li[1]/a') # 会员列表
        self.member_add = (By.XPATH, '//ul[@id="menu-ul"]/li[7]/ul/li[2]/a') # 会员添加
        self.member_leave_word = (By.XPATH, '//*[@id="menu-ul"]/li[7]/ul/li[5]/a') # 会员留言

